package com.zyf.school.manager.service.impl;

import com.zyf.school.manager.dao.DictDao;
import com.zyf.school.manager.domain.Dict;
import com.zyf.school.manager.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictServiceImpl implements DictService {
    @Autowired
    private DictDao dictDao;
    @Override
    public List<Dict> queryByParentid(int parentid, int startIndex, int pageSize) {
        return null;
    }

    @Override
    public Dict insertDict(Dict dict) {
        dictDao.insert(dict);
        return dict;
    }

    @Override
    public List<Dict> queryByType(String type, int startIndex, int pageSize) {
        return dictDao.queryByType(type,startIndex,pageSize);
    }

    @Override
    public List<Dict> queryAll(int startIndex, int pageSize) {
        return dictDao.queryAll(startIndex,pageSize);
    }
}
